package com.tanger.common.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.google.common.base.MoreObjects;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description 用户详情实体类
 * @Author Hchenbin
 * @Date 2022/6/18 14:52
 * @Version 1.0
 */
@Data
@TableName("t_user")
@Api(value = "User", tags= "账户实体类")
public class UserDetail implements Serializable {

	@ApiModelProperty(value = "用户ID")
	private Long id;
	@ApiModelProperty(value = "用户名")
	private String name;
	@ApiModelProperty(value = "用户密码")
	private String password;
	@ApiModelProperty(value = "明文密码")
    private String expPassword;
	@ApiModelProperty(value = "用户手机")
	private String mobile;
	@ApiModelProperty(value = "所属部门")
	private String department;
	@ApiModelProperty(value = "角色名称")
	private String roleName;
	@ApiModelProperty(value = "状态(1.启用 0.禁用)")
	private Integer status;
	@ApiModelProperty(value = "创建时间")
	private Long createDate;
	@ApiModelProperty(value = "更新时间")
	private Long updateDate;
	@ApiModelProperty(value = "是否删除(0.否 1.是)")
	private Integer delFlag;
	@ApiModelProperty(value = "是否超管(0.否 1.是)")
	private Integer isAdmin;
	@ApiModelProperty(value = "权限集合")
	@TableField(exist = false)
	private String[] permissions;


	@Override
	public String toString() {
		return MoreObjects.toStringHelper(this)
			.add("id", id)
			.add("name", name)
			.add("password", password)
			.add("mobile", mobile)
			.add("department", department)
			.add("roleName", roleName)
			.add("status", status)
			.add("createDate", createDate)
			.add("updateDate", updateDate)
			.add("delFlag", delFlag)
			.add("isAdmin", isAdmin)
            .add("expPassword",expPassword)
			.toString();
	}

}
